package com.whc.gulimall.ware.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whc.gulimall.ware.entity.WareOrderTaskDetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库存工作单
 *
 * @author wanghaochen
 * @email angaoen@outlook.com
 * @date 2022-03-05 00:09:03
 */
@Mapper
public interface WareOrderTaskDetailDao extends BaseMapper<WareOrderTaskDetailEntity> {

    /**
     * 获取到状态1的数据
     *
     * @param orderSn orderSn
     * @return id集合
     */
    List<Long> listLockedStockId(@Param("orderSn") String orderSn);

    List<WareOrderTaskDetailEntity> listDetailByOrderSnAndStatus(@Param("orderSn") String orderSn,
                                                                 @Param("status") int status);
}
